home *** CD-ROM | disk | FTP | other *** search
/ Amiga Plus Special 23 / AMIGAplus Sonderheft 23 (2000)(Falke)(DE)[!].iso / c / xingplay.doc < prev    next >
Text File  |  2000-01-01  |  7KB  |  204 lines

  1.   _________  ________   __   __   __  ________  _______  __   __
  2.  /\___  ___\/\______ \ /\ \ /\ \ /\ \/\  _  _ \/\_____ \/\ \ /\ \
  3.  \/__/\ \__/\/______\ \\ \ \\ \ \\ \ \ \ \\_\\ \/_____\ \ \ \\_\ \
  4.      \ \ \    /\  _____\\ \ \\ \ \\ \ \ \ \__/\ \/\  ____\ \  ___ \
  5.       \ \ \   \ \ \____/_\ \ \\ \ \\_\ \ \ \ \ \ \ \ \___/\ \ \_/\ \
  6.        \ \_\   \ \_\  /\_\\ \_\\ \______\ \_\ \ \_\ \_\    \ \_\\ \_\
  7.         \/_/    \/_/  \/_/ \/_/ \/______/\/_/  \/_/\/_/     \/_/ \/_/
  8.  
  9.                            XingPlay v1.1 by
  10.                       Nils Corneliusen, Triumph
  11.                       -------------------------
  12.  
  13. Introduction
  14. ------------
  15. XingPlay is the fastest XING-style Mpeg player available.
  16.  
  17. So,  what the h*** is an XING-style mpeg file anyway?  Well, it's like
  18. a normal mpeg file but with certain limitations:
  19.  
  20.    * Resolution: 160x120
  21.    * Only I-frames
  22.  
  23. An I-frame is an "intracoded frame" or a frame that does not depend on
  24. other  frames.   The  compression method is much like that of JPEG.  A
  25. normal  mpeg  file normally has an I-frame every 5th frame to serve as
  26. basis for the other frame types.
  27.  
  28. So why use only I-frames?  First of all, if you're grabbing live video
  29. and  using  one  of the low cost mpeg boards for PC (yuk), you'll most
  30. certainly  get  only  I-frames.   To produce a real mpeg in real time,
  31. you'll have to buffer a lot of frames to create the other frame types.
  32. This means adding a lot of fast ram and expensive enocding chips.
  33.  
  34. The  same  applies  to  decoding.   You have to buffer a lot of frames
  35. (normally  5) and apply changes according to the other frame types.  A
  36. fun little job that usually is pretty slow.
  37.  
  38. XingPlay  takes  the easy approach.  It assumes that any file you pass
  39. to  it  is  an Xing-style file.  All error checking is ignored and all
  40. the  low  level  decoding  routines  are written in assembler.  Direct
  41. rendering  routines  are  also  provided  to avoid going through cgfx/
  42. WritePixelArray() or the like (this would remove 20% of the speed).
  43.  
  44. All  rendering modes support double buffering.  To avoid jerking while
  45. playing  back  an mpeg, the entire file is loaded into memory at once.
  46. If you're low on memory, tough luck!
  47.  
  48. Since  color  and  intensity  are compressed separately (the intensity
  49. buffer is 4 times bigger than each of the 2 color buffers), it's a lot
  50. faster to replay the animation in grey mode.
  51.  
  52.  
  53. Usage
  54. -----
  55. The  options  are  changed  to  follow  normal  Amiga guidelines a bit
  56. closer.   This  means  that  addons  like "XingPlayGUI" won't work any
  57. more.  Oh well.
  58.  
  59. Template: XingPlay T=TIMING/K/N,G=GFXMODE/K/N,P=PIXELMODE/K/N,L=LOOP/K/N
  60.  
  61. LOOP (or L)
  62.  
  63. Must  be followed by a numeric argument specifying the number of times
  64. you  want  the  animation  to be played.  If you specify "LOOP 0", the
  65. animation will loop forever (or until you press LMB).
  66.  
  67. TIMING (or T)
  68.  
  69. Must  be  followed by a numeric argument specifying the minimum number
  70. of  frames to pass between each frame.  This provides you with a crude
  71. timing  mechanism.   If  you specify "TIMING 10", you will get no more
  72. than  5  frames  per second - less if you don't have enough cpu power.
  73. You guessed right, the timing is tied to the VB interrupt.
  74.  
  75. GFXMODE (or G)
  76.  
  77. Must be followed by a numeric argument specifying the display device.
  78. Possible values are:
  79.  
  80. 1: Cybergraphics 32 bit mode
  81. Works  on  any gfx card supporting the ARGB, BGRA or RGBA color modes.
  82. The  cards  I know of are Cybervision/64, Cybervision3D, Piccolo SD64.
  83. Pretty  fast  mode,  but a lot of data has to be shifted over the bus.
  84. In 2x2 mode, you're pushing it!  (320*240*4=300k/frame!)
  85.  
  86. 2: Cybergraphics 16 bit mode (RGB16/BGR16/RGB16PC/BGR16PC)
  87. Works  on any gfx card supporting the RGB16, BGR16, RGB16PC or BGR16PC
  88. modes.   Not all have been tested, but any decent gfx card should have
  89. one of these modes.  Tell me if it doesn't work!  It's a bit more easy
  90. on  the bandwith, but the decoding is a bit fuzzier.  Should be faster
  91. than mode 1 on low bandwith cards (PicassoII etc.).
  92.  
  93. 3: Cybergraphics  8 bit mode grey
  94. Works  on  any  gfx card supporting the LUT8 mode.  All cards I guess.
  95. However,  the  8  bit  mode  normally only provides an 18 bit palette.
  96. This means that you only get 64 shades of grey.  Extremely fast mode -
  97. watch it fly on my CV64!
  98.  
  99. 4: AGA HAM8 8 bit (AGA default)
  100. Works on AGA machines only and uses a PAL display.  The 2x2 pixel mode
  101. is actually faster than the 1x1 mode when using HAM8.
  102.  
  103. 5: AGA Grey 8 bit
  104. True 8 bit grey mode for AGA machines, PAL display. Fast.
  105.  
  106. 6: ECS Grey 4 bit (ECS default)
  107. 4  bit  grey mode for older machines, PAL display.  Looks pretty awful
  108. but is really fast!
  109.  
  110. All  Cybergfx  modes  are displayed on a 320x240 screen.  If you don't
  111. have such a resolution defined, the closest match is used.  This might
  112. look  weird,  since a double height screen is opened to provide double
  113. buffering.  Define a 320x240 mode now!
  114.  
  115. PIXMODE (or P)
  116.  
  117. Must be followed by a numeric argument specifying the pixel mode.
  118. Possible values are:
  119.  
  120. 1: 1x1 pixel mode
  121. 2: 1x1 pixel mode, black dither
  122. 3: 2x2 pixel mode (default)
  123.  
  124. Example:
  125.  
  126. XingPlay GFXMODE 1 PIXMODE 3 TIMING 5 LOOP 0 SpaceBattle.mpeg
  127.  
  128. This  will play the file "SpaceBattle.mpeg" on your gfx card in 32 bit
  129. rendering  mode  (CV64/CV3D/SD64)  using  2x2  pixels with a max of 10
  130. frames  per  second.   The  animation will loop until you interrupt it
  131. with the left mouse button.
  132.  
  133.  
  134. How to create Xing style mpegs
  135. ------------------------------
  136. To  create  an  Xing-style  mpeg, you have to invest in ImageFX.  With
  137. that  out  of  the  way,  start ImageFX and invoke the "BuildMPEG.ifx"
  138. arexx  script.   Select  the  "Xing override" option and specify input
  139. pattern as follows:
  140.  
  141.      Work:blah/frames/frame_%%%%
  142.  
  143. where  %%%%  means  that  frame number will be inserted here and be no
  144. less  than  4  numbers (0001,0002 etc.).  A single % means "insert the
  145. number as it is" (1,2,3,4,...10 etc.).
  146.  
  147. If you get confused by the other options (Bit rate, target size etc.),
  148. just ignore them.  That's why you turned "Xing override" on!
  149.  
  150. The frames can be in any format that can be loaded by ImageFx.  If the
  151. frames are not in 160x120 size, they will be scaled automatically.
  152.  
  153.  
  154. A word about speed
  155. ------------------
  156. If  you  have  a  060  system  running  AGA  only, you may notice that
  157. XingPlay  is  no  faster  than other run-of-the-mill players.  This is
  158. because it's impossible to copy any faster to chipram.  Get a gfx card
  159. and you'll see it fly!
  160.  
  161.  
  162. Where to get XING-style mpegs
  163. -----------------------------
  164. The  following  files  are  tested  and seems to work ok with XingPlay
  165. v1.1.  They can easily be found on Aminet:
  166.  
  167.     pix/anim/SpaceBattle.lha - Great 3d anim by Triumph :-)
  168.     pix/anim/MommaGlob.mpg - use loop mode on this one!
  169.     pix/anim/Gangster.lha
  170.     pix/anim/SpaceWar.lha
  171.     pix/anim/SpaceRace.mpg
  172.  
  173. You  might  try some of the other mpegs in the pix/anim directory, but
  174. remember that XingPlay will crash if it's not an Xing-style mpeg!
  175.  
  176.  
  177. More Information
  178. ----------------
  179. For more information about Triumph, try our web site:
  180.  
  181.      http://www.triumph.no
  182.  
  183. There  you'll  find  cool  information  about  other  projects, my own
  184. homepage and the like.
  185.  
  186.  
  187. Legal stuff
  188. -----------
  189. XingPlay  is  released  as freeware.  Use it as you wish.  This readme
  190. file must always accompany the executable.
  191.  
  192.  
  193. Author
  194. ------
  195.  
  196. email: corneliusen@triumph.no (try spelling the name right!)
  197.  
  198. www:   http://www.triumph.no/nils
  199.  
  200. snail: Nils Corneliusen
  201.        Frydens gate 5A
  202.        0564 Oslo
  203.        Norway
  204.